

Vue.component2('a_1_0_2_29_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_29_1_lines test': data.true, 'a_1_0_2_29_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-ziduan"></span>
        
        <span  class="a_1_0_2_29_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    init_val:function(){
      this.data.ps={};
    },
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];

  
  _this.data.change_data=function(data){
    try{
        if(!_this.data.db_id){
            let path_l=_this.data.path.split(".");
            _this.data.db_id=path_l[path_l.length-2];
            _this.data.field_id=path_l[path_l.length-1];
        }
    }
    catch{}
    //更新数据 
  let deepcopy_dat=JSON.parse(JSON.stringify(data));
  deepcopy_dat['name']=data['en_name']+`[${data['ch_name']}]`;
    data['deepcopy_data']={"name":data['ch_name']}
    //更新数据 
    let update_val={
        "type":"change_data",
        "data_type":"set_list",//类型 修改数据
        "delete":[{
          "path":`db_config.dict.1.dict.${_this.data.db_id}.dict.${_this.data.field_id}.base_info.deepcopy_data.ps`
        }],
        "postput":[{
            'path':`db_config.dict.1.dict.${_this.data.db_id}.dict.${_this.data.field_id}.base_info.deepcopy_data`,
            'data':deepcopy_dat,
          },
        ],
      }
    //向服务端websocket发送消息
    _this.data.全局配置对象.更新(update_val);
  }


_this.data.icon_data={
    99:{
        icon_class:"icon iconfont icon-write",
        hovertext:"修改属性",
        add_show:false,
        click:async function(){
            a_1_0_2_28_1_open_dialog({"data":_this.data,"callback":_this.data.change_data});
        },
      },
}


}

})